JavaScript

A5.u.iconelement Method

Syntax

A5.u.icon.element(icon[,attributes])

Arguments

iconstring

The string defining the icon to create. See A5.u.icon for details on the icon string.

Returns

elementelement

The HTML element for the icon.

Description

Get the HTML element for an icon.

Example

var imgIcon = A5.u.icon.element('icons/error.png');
// imgIcon = IMG element
var cssIcon = A5.u.icon.element('cssIcon=icon iconError');
// cssIcon = I element
var svgIcon = A5.u.icon.element('svgIcon=#icon-error:iconErr,24px');
// svgIcon = SVG element